<template>
    <!--aside-->
    <aside class="slidebar">
        <div class="container" @click="toggle();">
            <transition>
                <div class="overlay ">
                    <nav>
                        <ul>
                            <li v-for="item in list">
                                <a to="">
                                    <span v-text="item"></span>
                                    <span></span>
                                    <i class="iconfont icon-  right"></i>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </transition>
        </div>
    </aside>
</template>

<script>
    import $ from 'jquery'
    export default {
        data:function () {
            return {
                list : ['首页','影片','影院','商城','演出','我的','卖座网'],

            }
        },
        methods:{
            toggle:function(){
                alear(123);
                $('.overlay').toggle();
            }
        }

    }
</script>

<style>
    .v-enter-active {animation: big-in 5s;}
    .v-leave-active {animation: big-out 5s;}

    @keyframes big-in {
        0% {
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        100% {
            width: 300px;
            height: 300px;
            border: 1px solid red;
        }
    }
    @keyframes big-out {
        0% {
            width: 300px;
            height: 300px;
            border: 1px solid red;
        }
        100% {
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
    }
    .container{
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        color: #9a9a9a;
        z-index: 501;
    }
    .overlay{
        background: rgba(0,0,0,0.5);
        position: absolute;
        top: 50px;
        right: 0;
        bottom: 0;
        left: 0;
    }
    nav{
        border-top: 1px solid #222;
        box-shadow: 0 1px 1px #363636 inset;
        background: #282828;
        position: absolute;
        display: block;
        top: 0;
        right: 110px;
        bottom: 0;
        left: 0;
    }
    ul,li{
        margin: 0;padding: 0;list-style: none;
    }
    .overlay li{
        line-height: 50px;
        width: 100%;
    }
    .overlay li a{ 
        box-sizing: border-box;
        display: block;
        width: 100%;
        padding: 0 16px;
        border-bottom: 1px dotted #333;
        color: #9a9a9a;
        font-size: 14px;
    }
    .overlay li a .right{
        float: right;
        color: #666;
        font-size: 14px;
    } 
</style>
